describe("MoveHomeController unit test", function(){

    var moveHomeController = null;

    beforeEach(function(){

        var t_alertCtrl = App.AlertController.create();
        var t_loadingCtrl = App.LoadingController.create();
        App.MoveHomeController.reopen({

            init:function(){
                this.set('controllers.alert', t_alertCtrl);
                this.set('controllers.loading', t_loadingCtrl);
            }
        });

        moveHomeController = App.MoveHomeController.create();
    });

    describe("controller unit test", function(){

        it("prepareController", function(){

            //TODO
//            spyOn(App.OwnAccountTransfer, 'create');
//            spyOn(App.BillPayment, 'create');
//            spyOn(App.ThirdPartyTransfer, 'create');
//
//            var itemArray = Ember.A([
//                App.MoveListItem.create({
//                    title: moveHomeController.get('i18nData.myAccounts'),
//                    param: 'oat',
//                    link: 'move'
//                }),
//                App.MoveListItem.create({
//                    title: moveHomeController.get('i18nData.billPayment'),
//                    param: 'bp',
//                    link: 'move'
//                }),
//                App.MoveListItem.create({
//                    title: moveHomeController.get('i18nData.oneTimeBillPayment'),
//                    param: 'otbp',
//                    link: 'move'
//                }),
//                App.MoveListItem.create({
//                    title: moveHomeController.get('i18nData.thirdPartyTransfer'),
//                    param: 'tpt',
//                    link: 'move'
//                }),
//                App.MoveListItem.create({
//                    title: moveHomeController.get('i18nData.myCards'),
//                    param: 'ccp',
//                    link: 'move'
//                }),
//                App.MoveListItem.create({
//                    title: moveHomeController.get('i18nData.topUpPayment'),
//                    param: 'tpbp',
//                    link: 'move'
//                }),
//                App.MoveListItem.create({
//                    title: moveHomeController.get('i18nData.oneTimeTopUpPayment'),
//                    param: 'ottpbp',
//                    link: 'move'
//                }),
//                App.MoveListItem.create({
//                    title: moveHomeController.get('i18nData.seeYourTransferHistory'),
//                    link: 'move.transferHistory'
//                })
//            ]);
//
//            spyOn(moveHomeController, 'set');
//            moveHomeController.prepareController();
//            expect(moveHomeController.set).toHaveBeenCalledWith('moveItems', itemArray)
        });

        it("selectListItem", function(){

            var item = Ember.Object.create({
                title: 'Title',
                param: 'Parameter',
                link: 'move'
            });

            spyOn(moveHomeController, 'transitionTo');
            spyOn(window, 'scrollTo');
            moveHomeController.selectListItem(item);
            expect(moveHomeController.transitionTo).toHaveBeenCalledWith(item.link, item.param);
            expect(window.scrollTo).toHaveBeenCalledWith(0,0);
        });
    })
})